// 基于template/src/widgets/{{appEntities}}/{{ctrls@TREEVIEW}}-tree/{{spinalCase ctrl.codeName}}-tree-model.ts.hbs生成
import { ITreeModel, ITreeNodeModel, ITreeNodeRsModel } from "@/core";

function getModel(): ITreeModel {
    return {
        name: "tree",
        caption: "",
        codeName: "TreeView",
        cssName: "",
        controlType: "TREEVIEW",
        entityCodeName: "IBIZBOOK",
        ctrlMsgModel:[
    ],
        rootVisible: false,
        treeNodes: getTreeNodes(),
        treeNodeRSs: getTreeNodeRSs(),
    }
}

function getTreeNodes(): ITreeNodeModel[] {
    return [
            {
                id: "ROOT",
                treeNodeType: "STATIC",
                allowDrag: false,
                allowDrop: false,
                allowEditText: false,
                allowOrder: false,
                enableCheck: false,
                disableSelect: false,
                expanded: false,
                cssName: "",
                leaf: false,
                selected: false,
                navFilter: "",
                appendPNodeId: false,
                counterId: "",
                counterMode: 0,
                nodeType: "ROOT",
                rootNode: true,
                selectFirstOnly: false,
                expandFirstOnly: false,
                enableQuickSearch: false,
                text: "默认根节点",
                tooltip: "",
                nodeValue: "root",
                navigateContext: {  },
                navigateParams: {  },
            },
            {
                id: "book",
                treeNodeType: "STATIC",
                allowDrag: false,
                allowDrop: false,
                allowEditText: false,
                allowOrder: false,
                enableCheck: false,
                disableSelect: false,
                expanded: false,
                cssName: "",
                leaf: false,
                selected: false,
                navFilter: "",
                appendPNodeId: false,
                counterId: "",
                counterMode: 0,
                nodeType: "book",
                rootNode: false,
                selectFirstOnly: false,
                expandFirstOnly: false,
                enableQuickSearch: false,
                text: "图书",
                tooltip: "",
                nodeValue: "",
                navigateContext: {  },
                navigateParams: {  },
            },
            {
                id: "bookdata",
                treeNodeType: "DE",
                allowDrag: false,
                allowDrop: false,
                allowEditText: false,
                allowOrder: false,
                enableCheck: false,
                disableSelect: false,
                expanded: false,
                cssName: "",
                leaf: true,
                selected: false,
                navFilter: "",
                appendPNodeId: false,
                counterId: "",
                counterMode: 0,
                nodeType: "bookdata",
                rootNode: false,
                selectFirstOnly: false,
                expandFirstOnly: false,
                enableQuickSearch: false,
                entityCodeName: "IBIZBOOK",
                controlVoName: "BookdataControlVO",
                keyPSAppDEField: "IBIZBOOKId",
                majorPSAppDEField: "IBIZBOOKName",
                appDeDataSet: "FetchDefault",
                navigateContext: {  },
                navigateParams: {  },
            },
            {
                id: "dingdan",
                treeNodeType: "STATIC",
                allowDrag: false,
                allowDrop: false,
                allowEditText: false,
                allowOrder: false,
                enableCheck: false,
                disableSelect: false,
                expanded: false,
                cssName: "",
                leaf: false,
                selected: false,
                navFilter: "",
                appendPNodeId: false,
                counterId: "",
                counterMode: 0,
                nodeType: "dingdan",
                rootNode: false,
                selectFirstOnly: false,
                expandFirstOnly: false,
                enableQuickSearch: false,
                text: "订单",
                tooltip: "",
                nodeValue: "",
                navigateContext: {  },
                navigateParams: {  },
            },
            {
                id: "orderdata",
                treeNodeType: "DE",
                allowDrag: false,
                allowDrop: false,
                allowEditText: false,
                allowOrder: false,
                enableCheck: false,
                disableSelect: false,
                expanded: false,
                cssName: "",
                leaf: false,
                selected: false,
                navFilter: "",
                appendPNodeId: false,
                counterId: "",
                counterMode: 0,
                nodeType: "orderdata",
                rootNode: false,
                selectFirstOnly: false,
                expandFirstOnly: false,
                enableQuickSearch: false,
                entityCodeName: "IBIZOrder",
                controlVoName: "OrderdataControlVO",
                keyPSAppDEField: "IBIZOrderId",
                majorPSAppDEField: "IBIZOrderName",
                appDeDataSet: "FetchDefault",
                navigateContext: {  },
                navigateParams: {  },
            },
            {
                id: "orderdetail",
                treeNodeType: "DE",
                allowDrag: false,
                allowDrop: false,
                allowEditText: false,
                allowOrder: false,
                enableCheck: false,
                disableSelect: false,
                expanded: false,
                cssName: "",
                leaf: true,
                selected: false,
                navFilter: "",
                appendPNodeId: false,
                counterId: "",
                counterMode: 0,
                nodeType: "orderdetail",
                rootNode: false,
                selectFirstOnly: false,
                expandFirstOnly: false,
                enableQuickSearch: false,
                entityCodeName: "IBIZOrderDetail",
                controlVoName: "OrderdetailControlVO",
                keyPSAppDEField: "IBIZOrderDetailId",
                majorPSAppDEField: "IBIZOrderDetailName",
                appDeDataSet: "FetchDefault",
                navigateContext: {  },
                navigateParams: {  },
            }
    ]
}

function getTreeNodeRSs(): ITreeNodeRsModel[] {
    return [
            {
                childDeTreeNodeId: "bookdata",
                parentPSDETreeNodeId: "book",
                parentValueLevel: 1,
                searchMode: 3,
                navigateContext: {  },
                navigateParams: {  },
            },
            {
                childDeTreeNodeId: "book",
                parentPSDETreeNodeId: "ROOT",
                parentValueLevel: 1,
                searchMode: 3,
                navigateContext: {  },
                navigateParams: {  },
            },
            {
                childDeTreeNodeId: "orderdetail",
                parentPSDETreeNodeId: "orderdata",
                parentValueLevel: 1,
                searchMode: 3,
                navigateContext: {  },
                navigateParams: {  },
            },
            {
                childDeTreeNodeId: "orderdata",
                parentPSDETreeNodeId: "dingdan",
                parentValueLevel: 1,
                searchMode: 3,
                navigateContext: {  },
                navigateParams: {  },
            },
            {
                childDeTreeNodeId: "dingdan",
                parentPSDETreeNodeId: "ROOT",
                parentValueLevel: 1,
                searchMode: 3,
                navigateContext: {  },
                navigateParams: {  },
            }
    ]
}
export const model = getModel();
